{% extends "admin/change_form.html" %}
{% load i18n %}
{% block title %}{% trans "setting" %}{% endblock %}
{% block breadcrumbs %}
{% load staticfiles %}
{% endblock %}

{% block content %}
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="/admin/setting/save/" method="post" >{% csrf_token %}{% block form_top %}{% endblock %}

<h1>{% trans "setting" %}</h1>
<fieldset class="module aligned ">
	<h2>{% trans "fibo_data" %}</h2>

	<div class="form-row">
		<div>
			<label for="id_user">{% trans "user" %}:</label>
			<input class="vTextField" id="id_user" maxlength="30" name="user" type="text" value="{{setting_list.0.setting}}">
		</div>
	</div>

	<div class="form-row">
		<div>
			<label for="id_password">{% trans "password" %}:</label>
			<input class="vTextField" id="id_password" maxlength="30" name="password" type="text" value="{{setting_list.1.setting}}">
		</div>
	</div>

	<div class="form-row">
		<div>
			<label for="id_server_type">{% trans "service_type" %}:</label>
			<input class="vTextField" id="id_server_type" maxlength="30" name="service_type" type="text" value="{{setting_list.2.setting}}">
		</div>
	</div>
	
	<div class="form-row">
		<div>
			<label for="id_sender_name">{% trans "sender_name" %}:</label>
			<input class="vTextField" id="id_sender_name" maxlength="30" name="sender_name" type="text" value="{{setting_list.3.setting}}">
		</div>
	</div>
	
</fieldset>
<fieldset class="module aligned">
	<h2>{% trans "fibo_data" %}</h2>

	<div class="form-row" ng-app='backend'  ng-controller="settingController" >
		<div class="row">
			<div class="col-xs-4">
				<div class="form-row">
					<div>
						 <button ng-click="myData.doClick('status', $event)" class="btn btn-primary btn-sm status-button">{% trans "check_status" %}</button>
					</div>
				</div>
				<div class="form-row">
					<div>
						 <button ng-click="myData.doClick('bank', $event)" class="btn btn-primary btn-sm status-button">{% trans "check_bank" %}</button>
					</div>
				</div>
				<div class="form-row">
					<div>
						 <button ng-click="myData.doClick('service', $event)" class="btn btn-primary btn-sm status-button">{% trans "check_service" %}</button>
					</div>
				</div>
				<div class="form-row">
					<div>
						 <button ng-click="myData.doClick('brandname', $event)" class="btn btn-primary btn-sm status-button">{% trans "check_brandname" %}</button>
					</div>
				</div>
			</div>
   			<div class="col-xs-4">
   			<pre class="status_info" ng-bind-html="renderHtml(fromServer)"></pre>
			</div>
			<div class="col-xs-4">
				 <div class="ajax_loading" ng-show="ajax-loading">
                  	<img src="{% static 'bootstrap/images/ajax.gif' %}">
                  </div>
			</div>
		</div>
	</div>

</fieldset>
<div class="submit-row">
<input type="submit" value='{% trans "Save" %}' class="default" name="_save">
</div>
</form>

<!-- Stack the columns on mobile by making one full-width and the other half-width -->

{% endblock %}